1. Field of the Invention
The invention generally relates to image processing techniques for generating a dilation image, and more specifically relates to performing morphology of a digital image utilizing parallel binarization processing of each pixel of an image, and performing parallel processing of each pixel in a target image to obtain a dilation image.
2. Description of the Related Art
Conventionally, a dilation image is generated from an input image in four steps: binarization, extension, dilation, and clipping, where each step is performed sequentially and the binarization and dilation processes are performed on each pixel of the input image in sequence. For example, in the binarization step, each pixel of the input image is binarized in sequence utilizing a threshold value for each pixel. The result is a binarized image in which each pixel is represented by either a 0 or a 1. The binarization process typically is performed by scanning each row of the input image from left to right to process each pixel in sequence, then processing the next row of pixels from left to right, etc. until all rows have been processed. An example of a conventional binarization process of an input image is shown in FIG. 1A where a threshold value (T=4) is utilized. In the extension step, additional pixels are added to the boundaries of the binarized image according to the dimensions (height and width) of a Structuring Element (SE) and the location of the origin thereof, which is utilized for the dilation process. Thus, the extended image is a binary image that is larger in size than the original binary image obtained by binarizing the input image. Two example types of structuring elements are shown in FIG. 1B, while an example of an extension process is shown in FIG. 1C.
The conventional dilation process is then performed on each pixel of the extended binary image in sequence, much like the binarization step processes each pixel in sequence. Thus, the conventional dilation process can be time consuming depending on the size of the image. In more detail, in the dilation process, the extended binary image is first utilized to create a processing image, where each pixel of the binary image that includes a value of 1 is identified as a pixel of interest. FIG. 1D depicts an example of a conventional process for obtaining a processing image. The structuring element is then used to generate the dilation image from the processing image. FIGS. 1E and 1F depict a conventional sequential dilation process, which will now be described in detail.
In the conventional sequential dilation process, the structuring element is applied to each pixel in sequence, with the origin of the SE being placed upon the pixel being processed. The first row of the processing image is scanned, left to right, in sequence. Pixels surrounding the first pixel of interest are then processed in sequence utilizing the overlapping pixels of the structuring element so that the value of each pixel of the processing image in which an overlapping pixel of the structuring element that includes a 1 is updated by 1. Each pixel in the first row is scanned in sequence for pixels of interest with the structuring element being translated across the row accordingly. Once each pixel in the first row of the processing image has been processed in sequence, the second row of the processing image is processed, left to right, in the same manner. This sequential dilation image processing continues until each row of the processing image has been processed.
After the dilation image has been generated, the dilation image is clipped by deleting the pixels added in the extension process. In this regard, the additional extended pixels are required to be processed in the sequential processing, thereby adding additional processing time. Each pixel in the dilation image with a value of 1 is then retained, thereby resulting in dilated image that has more object pixels (pixels with a value of 1) than the original input image. The clipped image is then output as the final resulting image. An example of the clipping process is depicted in FIG. 1G.
One problem with the foregoing conventional dilation image process is that each pixel of the image is processed sequentially during both the binarization process and during the dilation processes. Another problem is that the binarization, extension, dilation and clipping process are each performed in sequence. As a result, the time needed to generate the dilation image increases with the size of the digital image. Thus, very high resolution images (e.g., a 2048×2048, or 2K×2K, pixel digital image) require a greater amount of time to process. For instance, it has been found that the foregoing conventional sequential process applied to a 2K×2K image was able to process 0.20 frames per sec (fps), or approximately 5 seconds to process one frame. As will be described below, the invention has been found to result in the ability to process approximately 250 frames per second., or 0.004 seconds to process one frame.